package com.px.baolaiapi.ExcelDto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 3)
// 头字体设置成20
@HeadFontStyle(fontHeightInPoints = 12)
@HeadRowHeight(20)
// 内容字体设置成20
@ContentFontStyle(fontHeightInPoints = 10)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
public class ExcelSparePartDto implements Serializable {
    private static final long serialVersionUID = 1L;


    @ExcelProperty(value = "备品备件编码", index = 0)
    @ColumnWidth(20)
    private String code;

    @ExcelProperty(value = "备品备件名称", index = 1)
    @ColumnWidth(20)
    private String name;

    @ExcelProperty(value = "材质", index = 2)
    @ColumnWidth(20)
    private String materialQuality;
    @ExcelProperty(value = "规格", index = 3)
    @ColumnWidth(20)
    private String specifications;

    @ExcelProperty(value = "重量", index = 4)
    @ColumnWidth(20)
    private String weight;

    @ExcelProperty(value = "重量单位", index = 5)
    @ColumnWidth(20)
    private String warrantyTime;

    @ExcelProperty(value = "数量", index = 6)
    @ColumnWidth(20)
    private String num;

    @ExcelProperty(value = "数量单位", index = 7)
    @ColumnWidth(20)
    private String numUnit;

    @ExcelProperty(value = "描述", index = 8)
    @ColumnWidth(20)
    private String mdesc;
}
